package club.ruanx.spider.util;

import org.jsoup.Connection;
import org.jsoup.Jsoup;

import java.net.Proxy;

/**
 * @author 阮胜
 * @date 2018/11/26 13:08
 */
public class JsoupUtils {
    private static Proxy proxy;
    public static Connection connect(String url) {
        if (proxy == null) {
            return Jsoup.connect(url);
        }
        return Jsoup.connect(url).proxy(proxy);
    }
}
